package org.andes.kownledge.operator.func;

import org.andes.kownledge.operator.Atom;
import org.andes.kownledge.operator.NoAtom;
import org.andes.kownledge.operator.Term;
import org.andes.kownledge.operator.Variable;

public class GROUNDP extends Func {

	
//	;;;;
//	;;;; ============= test if expression contains variables ====================
//	;;;;

//	(defun groundp (form)
//	  "True if the given form contains no variables"
//	  (cond ((variable-p form) NIL)
//		((atom form) t)
//		(t (and (groundp (car form))
//			(groundp (cdr form))))))
	@Override
	public Object doFunc() {
		Term form=vars.get(0);
		if(form.isGround())
			return new Boolean(true);
		else
			return null;
		
	}

}
